package com.ringtheweb.persistence.dao;

import java.util.List;

import com.ringtheweb.model.User;

/**
 * DAO for {@link User}
 * @author ldewavri
 *
 */
public interface IUserDAO extends IGenericDAO<User, Long> {
	
	/**
	 * Find a user by its login name
	 * @param login the login
	 * @return the {@link User}
	 */
	public User findByLogin(String login);
	
	
	/**
	 * Find a user by its login and password
	 * @param login the login name
	 * @param clearTextPassword the clear text passord
	 * @return the {@link User} or null if not found.
	 */
	public User findByLoginAndPassword(String login,String clearTextPassword);
	
	
	/**
	 * Find all users that have this role name
	 * @param roleName the role name
	 * @return the list of users
	 */
	public List<User> findByRoleName(String roleName);

}
